import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../../../services/ityingFonts.dart';
import '../../../services/screebAdapter.dart';
import '../controllers/productContent_controller.dart';
import 'package:flutter_html/flutter_html.dart';

class SecondPageView extends GetView {
  @override
  ProductContentController controller = Get.find();
  Function subHeader;
  SecondPageView(this.subHeader, {super.key});

  @override
  Widget build(BuildContext context) {
    return Container(
      key: controller.gk1,
      width: double.infinity,
      child: Column(
        children: [
          subHeader(),
          // ignore: unrelated_type_equality_checks
          Obx(() => controller.selectSubTabsIndex == 1
              ? Container(
                  width: ScreenAdapter.width(1080),
                  child: Html(
                    data: controller.pcontent.value.content,
                    style: {
                      "body": Style(backgroundColor: Colors.white),
                      "p": Style(fontSize: FontSize.large),
                    },
                  ),
                )
              : Container(
                  width: ScreenAdapter.width(1080),
                  child: Html(
                    data: controller.pcontent.value.specs,
                    style: {
                      "body": Style(backgroundColor: Colors.white),
                      "p": Style(fontSize: FontSize.large),
                    },
                  ),
                ))
        ],
      ),
    );
  }
}
